#!/bin/bash
#
now=$(date +%s)

for proc_id in $(ps -eo pid | awk "NR>1");do
	proc_start_time=$(ps -p $proc_id -o lstart=)
	proc_start_timestap=$(date -d "$proc_start_time" +%s)
	let offset=now-proc_start_timestap
	if [ $offset -lt 900 ];then
		echo "进程ID：$proc_id,进程名称：$(ps -p ${proc_id} -o comm=)"
	fi
done
